.themeSettings {
  padding: 8px;
  
  .themeCard {
    margin-bottom: 24px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
    background: var(--component-background);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    
    &:hover {
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
      transform: translateY(-2px);
    }
    
    .cardTitle {
      font-size: 18px;
      font-weight: 600;
      margin-bottom: 20px;
      color: var(--text-color);
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 20px 20px 0;
      
      .titleIcon {
        font-size: 20px;
        color: var(--primary-color);
      }
    }
    
    .cardContent {
      padding: 0 20px 20px;
    }
  }

  .themeMode {
    .modeGrid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
    }
    
    .modeOption {
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 20px 16px;
      border: 2px solid var(--border-color);
      border-radius: 12px;
      cursor: pointer;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      background: var(--bg-color);
      position: relative;
      overflow: hidden;

      &::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
        transition: left 0.5s;
      }

      &:hover {
        border-color: var(--primary-color);
        background-color: var(--hover-bg);
        transform: translateY(-4px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
        
        &::before {
          left: 100%;
        }
      }

      &.active {
        border-color: var(--primary-color);
        background: linear-gradient(135deg, var(--primary-bg), var(--primary-1));
        box-shadow: 0 4px 16px rgba(24, 144, 255, 0.2);
        
        .modeIcon {
          color: var(--primary-color);
          transform: scale(1.1);
        }
      }

      .modeIcon {
        font-size: 32px;
        margin-bottom: 12px;
        transition: all 0.3s ease;
        color: var(--text-color-secondary);
      }

      .modeText {
        text-align: center;
        
        .modeName {
          font-weight: 600;
          font-size: 16px;
          margin-bottom: 6px;
          color: var(--text-color);
        }

        .modeDesc {
          font-size: 12px;
          color: var(--text-color-secondary);
          line-height: 1.4;
        }
      }
      
      .checkIcon {
        position: absolute;
        top: 12px;
        right: 12px;
        color: var(--primary-color);
        font-size: 16px;
        opacity: 0;
        transform: scale(0);
        transition: all 0.3s ease;
      }
      
      &.active .checkIcon {
        opacity: 1;
        transform: scale(1);
      }
    }
  }

  .colorPicker {
    .colorSection {
      margin-bottom: 24px;
      
      .sectionTitle {
        font-size: 14px;
        font-weight: 600;
        color: var(--text-color);
        margin-bottom: 12px;
        display: flex;
        align-items: center;
        gap: 6px;
        
        .sectionIcon {
          font-size: 16px;
          color: var(--primary-color);
        }
      }
    }
    
    .colorGrid {
      display: grid;
      grid-template-columns: repeat(8, 1fr);
      gap: 12px;

      .colorItem {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        cursor: pointer;
        position: relative;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border: 3px solid transparent;
        background-clip: padding-box;
        
        &::before {
          content: '';
          position: absolute;
          inset: -3px;
          border-radius: 15px;
          padding: 3px;
          background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask-composite: xor;
          opacity: 0;
          transition: opacity 0.3s ease;
        }

        &:hover {
          transform: scale(1.15) rotate(5deg);
          box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
          
          &::before {
            opacity: 1;
          }
        }

        &.active {
          border-color: #fff;
          box-shadow: 0 0 0 3px var(--primary-color), 0 8px 20px rgba(0, 0, 0, 0.2);
          transform: scale(1.1);
          
          &::before {
            opacity: 1;
          }
        }

        .checkIcon {
          position: absolute;
          top: 50%;
          left: 50%;
          transform: translate(-50%, -50%);
          color: #fff;
          font-size: 18px;
          opacity: 0;
          transition: all 0.3s ease;
          text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        }

        &.active .checkIcon {
          opacity: 1;
          transform: translate(-50%, -50%) scale(1.2);
        }
      }
    }

    .customColor {
      margin-top: 20px;
      padding: 16px;
      background: var(--bg-color);
      border-radius: 12px;
      border: 1px solid var(--border-color);
      
      .customColorLabel {
        font-size: 14px;
        font-weight: 500;
        color: var(--text-color);
        margin-bottom: 12px;
        display: flex;
        align-items: center;
        gap: 6px;
        
        .customIcon {
          font-size: 16px;
          color: var(--primary-color);
        }
      }
      
      .colorInputWrapper {
        position: relative;
        
        .colorInput {
          width: 100%;
          height: 48px;
          border: 2px solid var(--border-color);
          border-radius: 12px;
          cursor: pointer;
          transition: all 0.3s ease;
          
          &:hover {
            border-color: var(--primary-color);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
          }
        }
        
        .colorValue {
          position: absolute;
          right: 12px;
          top: 50%;
          transform: translateY(-50%);
          font-size: 12px;
          font-weight: 500;
          color: var(--text-color-secondary);
          background: var(--component-background);
          padding: 4px 8px;
          border-radius: 6px;
          pointer-events: none;
        }
      }
    }
  }

  .layoutSettings {
    .settingItem {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 20px;
      background: var(--bg-color);
      border-radius: 12px;
      border: 1px solid var(--border-color);
      margin-bottom: 16px;
      transition: all 0.3s ease;

      &:last-child {
        margin-bottom: 0;
      }
      
      &:hover {
        border-color: var(--primary-color);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        transform: translateY(-2px);
      }

      .settingLabel {
        .labelText {
          font-weight: 600;
          font-size: 16px;
          margin-bottom: 6px;
          color: var(--text-color);
        }

        .labelDesc {
          font-size: 13px;
          color: var(--text-color-secondary);
          line-height: 1.4;
        }
      }
      
      .settingControl {
        min-width: 140px;
        
        .sliderWrapper {
          .ant-slider {
            margin: 0;
          }
          
          .sliderValue {
            text-align: center;
            font-size: 12px;
            color: var(--text-color-secondary);
            margin-top: 4px;
          }
        }
      }
    }
  }

  .presetThemes {
    .themePresets {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
      gap: 16px;

      .presetItem {
        padding: 20px 16px;
        border: 2px solid var(--border-color);
        border-radius: 16px;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        text-align: center;
        background: var(--bg-color);
        position: relative;
        overflow: hidden;
        
        &::before {
          content: '';
          position: absolute;
          top: 0;
          left: -100%;
          width: 100%;
          height: 100%;
          background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
          transition: left 0.5s;
        }

        &:hover {
          border-color: var(--primary-color);
          transform: translateY(-4px) scale(1.02);
          box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
          
          &::before {
            left: 100%;
          }
          
          .presetPreview .colorDot {
            transform: scale(1.1);
          }
        }

        &.active {
          border-color: var(--primary-color);
          background: linear-gradient(135deg, var(--primary-bg), var(--primary-1));
          box-shadow: 0 6px 20px rgba(24, 144, 255, 0.2);
          
          .presetName {
            color: var(--primary-color);
            font-weight: 600;
          }
          
          .activeIcon {
            opacity: 1;
            transform: scale(1);
          }
        }

        .presetPreview {
          display: flex;
          gap: 6px;
          justify-content: center;
          margin-bottom: 12px;

          .colorDot {
            width: 16px;
            height: 16px;
            border-radius: 50%;
            transition: all 0.3s ease;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
          }
        }

        .presetName {
          font-size: 14px;
          font-weight: 500;
          color: var(--text-color);
          transition: all 0.3s ease;
        }
        
        .activeIcon {
          position: absolute;
          top: 12px;
          right: 12px;
          color: var(--primary-color);
          font-size: 16px;
          opacity: 0;
          transform: scale(0);
          transition: all 0.3s ease;
        }
      }
    }
  }

  .actionButtons {
    margin-top: 32px;
    display: flex;
    gap: 16px;

    .actionBtn {
      flex: 1;
      height: 48px;
      border-radius: 12px;
      font-weight: 600;
      font-size: 14px;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      position: relative;
      overflow: hidden;
      
      &::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        transition: left 0.5s;
      }
      
      &:hover::before {
        left: 100%;
      }
    }

    .resetBtn {
      background: var(--bg-color);
      border: 2px solid var(--border-color);
      color: var(--text-color);
      
      &:hover {
        border-color: #ff4d4f;
        color: #ff4d4f;
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(255, 77, 79, 0.2);
      }
      
      &:active {
        transform: translateY(0);
      }
    }

    .exportBtn {
      background: linear-gradient(135deg, var(--primary-color), var(--primary-color-hover));
      border: none;
      color: #fff;
      
      &:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(24, 144, 255, 0.3);
        background: linear-gradient(135deg, var(--primary-color-hover), var(--primary-color));
      }
      
      &:active {
        transform: translateY(0);
      }
    }
  }
  
  // 响应式设计
  @media (max-width: 768px) {
    .themeSettings {
      padding: 4px;
      
      .themeCard {
        margin-bottom: 16px;
        
        .cardTitle {
          font-size: 16px;
          padding: 16px 16px 0;
        }
        
        .cardContent {
          padding: 0 16px 16px;
        }
      }
      
      .themeMode .modeGrid {
        grid-template-columns: 1fr;
        gap: 12px;
      }
      
      .colorPicker .colorGrid {
        grid-template-columns: repeat(6, 1fr);
        gap: 8px;
        
        .colorItem {
          width: 36px;
          height: 36px;
        }
      }
      
      .presetThemes .themePresets {
        grid-template-columns: 1fr;
        gap: 12px;
      }
      
      .actionButtons {
        flex-direction: column;
        gap: 12px;
      }
    }
  }
  
  @media (max-width: 480px) {
    .colorPicker .colorGrid {
      grid-template-columns: repeat(5, 1fr);
      
      .colorItem {
        width: 32px;
        height: 32px;
      }
    }
  }
}

// CSS变量定义
:root {
  --primary-color: #1890ff;
  --primary-bg: rgba(24, 144, 255, 0.1);
  --text-color: rgba(0, 0, 0, 0.85);
  --text-color-secondary: rgba(0, 0, 0, 0.45);
  --border-color: #d9d9d9;
  --hover-bg: rgba(0, 0, 0, 0.04);
}

[data-theme='dark'] {
  --primary-color: #1890ff;
  --primary-bg: rgba(24, 144, 255, 0.15);
  --text-color: rgba(255, 255, 255, 0.85);
  --text-color-secondary: rgba(255, 255, 255, 0.45);
  --border-color: #434343;
  --hover-bg: rgba(255, 255, 255, 0.04);
}